package demo;

import com.cooldatasoft.currency.cache.CurrencyCache;
import com.cooldatasoft.currency.data.ExchangeRate;

public class Demo {

	public static void main(String[] args) {
		String[] array = {"USD","GBP","EUR","TRY"};
		
		for(int i=0; i<100;i++){
			int from = (int)(Math.random()*4);
			int to = (int)(Math.random()*4);
			
			while(from == to){
				to = (int)(Math.random()*4);
			}
			System.out.println(array[from]+" --> "+array[to]);
			ExchangeRate rate = CurrencyCache.getRate(array[from], array[to]);
			System.out.println(rate);
		}
	}
}
